---
title: Using Vercel AI Gateway in LobeChat
description: >-
  Learn how to integrate and utilize Vercel AI Gateway's unified API in LobeChat.

tags:
  - LobeChat
  - Vercel AI Gateway
  - API Key
  - Web UI
---

# Using Vercel AI Gateway in LobeChat

[Vercel AI Gateway](https://vercel.com/ai-gateway) is a unified API that provides access to 100+ AI models through a single endpoint. It offers features like budget management, usage monitoring, load balancing, and fallback handling.

This article will guide you on how to use Vercel AI Gateway in LobeChat.

<Steps>
  ### Step 1: Create an API Key in Vercel AI Gateway

  - Go to [Vercel Dashboard](https://vercel.com/dashboard)
  - Click on the **AI Gateway** tab on the left side
  - Click on **API keys** in the left sidebar
  - Click **Create key** and then **Create key** in the dialog to complete

  ### Step 2: Configure Vercel AI Gateway in LobeChat

  - Go to the `Settings` page in LobeChat
  - Under `AI Service Provider`, find the setting for `Vercel AI Gateway`
  - Enter the API Key you obtained
  - Choose a model from Vercel AI Gateway for your AI assistant to start the conversation

  <Callout type={'warning'}>
    During usage, you may need to pay the API service provider, so please refer to Vercel AI Gateway's
    [pricing policy](https://vercel.com/docs/ai-gateway/models).
  </Callout>
</Steps>

At this point, you can start chatting using the models provided by Vercel AI Gateway in LobeChat.

## Model Selection

Vercel AI Gateway supports various model providers including:

- **OpenAI**: `openai/gpt-4o`, `openai/gpt-4o-mini`, `openai/o1`, etc.
- **Anthropic**: `anthropic/claude-3-5-sonnet`, `anthropic/claude-3-opus`, etc.
- **Google**: `google/gemini-2.5-pro`, `google/gemini-2.0-flash`, etc.
- **DeepSeek**: `deepseek/deepseek-chat`, `deepseek/deepseek-reasoner`, etc.
- And many more...

For a complete list of supported models, visit [Vercel AI Gateway Models](https://vercel.com/ai-gateway/models).

## API Configuration

Vercel AI Gateway uses OpenAI-compatible API format. The base URL is:

```
https://ai-gateway.vercel.sh/v1
```

You can use any OpenAI-compatible client with this endpoint and your API key.
